<template>
  <div>
    <a-steps :current="current" id="steps">
      <a-step title="选择游戏/商品" />
      <a-step title="填写商品信息" />
      <a-step title="发布成功" />
    </a-steps>
    <Shop v-if="current === 0" @close="close" />
    <Shopmsg v-if="current === 1" :shop="shop" @previous="previous" />
  </div>
</template>

<script>
export default {
  layout: "main",
  components: {
    Shop: () => import("~/components/selectgame/shop"),
    Shopmsg: () => import("~/components/selectgame/shopmsg")
  },
  data() {
    return {
      current: 0,
      shop: {}
    };
  },
  created() {},
  methods: {
    previous() {
      this.current--;
    },
    close(v) {
      this.current++;
      if (v.type == "shop") {
        this.shop = v;
      }
    }
  }
};
</script>
<style lang="less" scoped>
#steps {
  margin-bottom: 20px;
}
</style>